<?php
/*
	插件概览
*/
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'get';
if($_RQ['op']=='get'){
	//显示统计数据
	$daytime = mktime(0,0,0,date('m'),date('d'),date('Y'));
	$tstart= mktime(0,0,0,date('m'),date('d'),date('Y'));
	$tend =$tstart+24*3600;
	if($_SESSION['storeids']){
		$new['all']=pdo_count('jy_yxw_infee_log',array('storeid'=>$_SESSION['storeids'],'uniacid'=>$_SESSION['uniacid'],'type'=>2,'status'=>0));
		$genjin['all']=pdo_count('jy_yxw_infee_log',array('storeid'=>$_SESSION['storeids'],'uniacid'=>$_SESSION['uniacid'],'type'=>1,'status'=>0),'id');
		$member['all'] = pdo_count('jy_yxw_tuifee_log',array('storeid'=>$_SESSION['storeids'],'uniacid'=>$_SESSION['uniacid'],'status'=>1));
		$isbao['all'] = pdo_count('jy_yxw_fenfee_log',array('uniacid'=>$_SESSION['uniacid'],'storeid'=>$_SESSION['storeid'],'status'=>0,'timenum <'=>$tend));
	}else{
		$new['all']=pdo_count('jy_yxw_infee_log',array('uniacid'=>$_SESSION['uniacid'],'type'=>2,'status'=>0));
		$genjin['all']=pdo_count('jy_yxw_infee_log',array('uniacid'=>$_SESSION['uniacid'],'type'=>1,'status'=>0),'id');
		$member['all'] = pdo_count('jy_yxw_tuifee_log',array('uniacid'=>$_SESSION['uniacid'],'status'=>1));
		$isbao['all'] = pdo_count('jy_yxw_fenfee_log',array('uniacid'=>$_SESSION['uniacid'],'status'=>0,'timenum <'=>$tend));
	}
	$htmls=array(
		array('type'=>'data','num'=>12,'one_num'=>3,'title'=>'待处理数据','datas'=>array(
			array('title'=>'待定金用户数','data'=>$new['all']),
			array('title'=>'待成交用户数','data'=>$genjin['all']),
			array('title'=>'应收账款用户数','data'=>$isbao['day']),
			array('title'=>'待退费审批数','data'=>$member['all']),
		)),
	);
	$return['htmls']=$htmls;
	exi($return);
}